@Repository
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th=
        "http://www.thymeleaf.org" lang="en">
<head th:replace="fragments/header :: head">
</head>
<body>
<div class="container">
    <div class="row">
        <div class="container">
            <h3 class="text-center">用户个人信息</h3>
            <div class="row justify-content-center">
                <div th:fragment="userForm" class="col-md-4">
                    <div class="alert alert-success" th:if="${successMessage}" th:utext="${successMessage}"></div>
                    <form name="userForm" role="form" method="post" th:object="${user}" th:action="@{/users/edit}">
                        <div class="form-group">
                            <input type="hidden" class="form-control" id="id"
                                   name="id" th:field="*{userId}"/>
                        </div>
                        <div class="form-group">
                            <label class="form-control-label" for="login">用
                                户登录名</label>
                            <input type="text" class="form-control" id=
                                    "login" name="login"
                                   th:field="*{userName}" readonly >
                        </div>
                        <div class="form-group">
                            <label class="form-control-label" for="userFullname">用户
                                全名</label>
                            <input type="text" class="form-control" id=
                                    "userFullname"
                                   th:field="*{userFullname}" name="userFullname"
                                   readonly>
                        </div>
                        <div class="form-group">
                            <label class="form-control-label" for="userPhone">用户电
                                话</label>
                            <input type="text" class="form-control" id="userPhone"
                                   th:field="*{userPhone}" name="userPhone" required
                                   maxlength="11" pattern="^[0-9]*$">
                            <div th:if="${#fields.hasErrors('userPhone')}">
                                <small class="form-text text-danger" th:errors=
                                        "*{userPhone}">
                                </small>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="form-control-label" for="userAddress">用户
                                地址</label>
                            <input type="text" class="form-control" id="userAddress"
                                   th:field="*{userAddress}" name="userAddress"
                                   required
                                   maxlength="120" pattern= "^[\u4e00-\u9fa5_a-zA-Z0-9]*$">
                            <div th:if="${#fields.hasErrors('userAddress')}">
                                <small class="form-text text-danger" th:errors=
                                        "*{userAddress}">
                                </small>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="form-control-label" for="userBankcard">用户
                                银行卡号</label>
                            <input type="text" class="form-control" id=
                                    "userBankcard"
                                   th:field="*{userBankcard}" name="userBankcard"
                                   readonly>
                        </div>
                        <div class = "col-12 text-right">
                            <a type="button" class="btn btn-secondary" th:href=
                                    "@{/users}">返回</a>
                            <button type="submit" class="btn btn-primary">信息更新
                            </button>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
</body>